<?php

include("html2fpdf.php");

$pdf=new HTML2FPDF();
$pdf->AddPage();
$fp = fopen("ejemplo.html","r");
$strContent = fread($fp, filesize("ejemplo.html"));
fclose($fp);
$pdf->WriteHTML($strContent);
$pdf->Output("sample.pdf");
echo "PDF file is generated successfully!";

?>